package com.bxy.dzsc.service.impl;

import com.bxy.dzsc.dao.MessagesDao;
import com.bxy.dzsc.domain.Messages;
import com.bxy.dzsc.service.MessagesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class MessagesServiceImpl implements MessagesService {
    @Autowired
    private MessagesDao dao;
    @Override
    public List<Messages> findall() {
        return dao.findall();
    }

    @Override
    public List<Messages> findbyuid(Integer uid) {
        return dao.findbyuid(uid);
    }

    @Override
    public Messages findbyid(Integer id) {
        return dao.findbyid(id);
    }

    @Override
    public void insertmessage(Messages messages) {
        dao.insertmessage(messages);
    }

    @Override
    public void deletemessage(Integer id) {
        dao.deletemessage(id);
    }
}
